import re

# group by pipeline

batRegex = re.compile(r'Batman|Tina Fey')
mo = batRegex.search('Batman and Tina Fey.')
print(mo.group())
print(mo)
print('----------'.center(20))
batRegex = re.compile(r'Bat(man|mobile|bat)')
mo = batRegex.search('Batmobile lost a Batbat')
print(mo.group())
print(mo.group(1))
print(mo)
print('----------'.center(20))
mo = batRegex.findall('Batmobile lost a Batbat')
for item in mo:
    print(item)
